]> dgit.raspbian.org Git - gnome-shell.git/commit
batch: Add mechanism for doing animation series
authorRay Strode <rstrode@redhat.com>
Thu, 30 Jun 2011 02:00:35 +0000 (22:00 -0400)
committerRay Strode <rstrode@redhat.com>
Sun, 28 Aug 2011 16:44:09 +0000 (12:44 -0400)
commit4902a600d52d24698611b8fefe1d4787f3e59089
tree9c7e4b5e6c5b4542832173e4193c1f1763bfad45
parentdb39ba3b9f5905f03949860433202c2e93b6ce69
batch: Add mechanism for doing animation series

In order for transformation animations to look good, they need to be
incremental and have some order to them (e.g., fade out hidden items,
then shrink to close the void left over).

Chaining animations in this way can be error prone and wordy using just
Tweener callbacks.

This commit adds a new set of classes to help:

 - Task.  encapsulates schedulable work to be run in a specific scope.

 - ConsecutiveBatch.  runs a series of tasks in order and completes
                      when the last in the series finishes.

 - ConcurrentBatch.  runs a set of tasks at the same time and completes
                     when the last to finish completes.

 - Hold.  prevents a batch from completing the pending task until
          the hold is released.

The tasks associated with a batch are specified in a list at batch
construction time as either task objects or plain functions.
Batches are task objects, themselves, so they can be nested.

For now, these APIs are temporarily getting staged in a gdm/ specific
subdirectory so they will be available for use by GDM.  They aren't
specific to GDM, or even to doing animations, though, so the API may eventually
move in some form or another to a more general location. Alternatively, the
APIs may ultimately get dropped entirely and replaced by something else.

https://bugzilla.gnome.org/show_bug.cgi?id=657082
js/Makefile.am
js/gdm/batch.js [new file with mode: 0644]